package com.packet.config;

public class FactoryTest {

 
    public static void main(String[] args){
        Director director = new Director();
        System.out.println("广播通知");
        Inform inform1 = director.createRobotByDirector(new InformAllBuilder());
        System.out.println(inform1.getInfo());
        System.out.println(inform1.getToName());
        System.out.println(inform1.getFromName());
        System.out.println(inform1.getWhenTime());

        System.out.println("个人通知");
        Inform inform2 = director.createRobotByDirector(new InformOneBuilder());
        System.out.println(inform2.getInfo());
        System.out.println(inform2.getToName());
        System.out.println(inform2.getFromName());
        System.out.println(inform2.getWhenTime());
    }
    
}